package com.sumer.psychology.comment.domain.model;

import com.google.common.collect.ImmutableMap;

import java.util.Map;

/**
 * 评论类型，blog，micro-blog，photo，share，comment, case_study, group
 * <p/>
 * User: zhenguang.zhu
 * Date: 2014/8/13
 * Time: 10:17
 */
public enum CommentType {
    BLOG, MICRO_BLOG, RESOURCE, PHOTO, CASE_STUDY, GROUP;

    private static Map<String, CommentType> aliasMap = ImmutableMap.<String, CommentType>builder()
            .put("blog", BLOG)
            .put("micro_blog", MICRO_BLOG)
            .put("resource", RESOURCE)
            .put("photo", PHOTO)
            .put("case_study", CASE_STUDY)
            .put("group", GROUP)
            .build();

    public static CommentType get(String alias) {
        return aliasMap.get(alias);
    }
}
